package spring.core.examples.java.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

import spring.core.examples.xml.AnnotatedLifecycleBean;

/**
 * Demonstrate how to configure lifecycle features in Spring context using a
 * Java class.
 */
@Configuration
@Profile("production")
public class LifecycleConfiguration {

	/**
	 * Annotated lifecycle.
	 * 
	 * @return the annotated lifecycle bean
	 */
	@Bean
	public AnnotatedLifecycleBean annotatedLifecycle() {
		return new AnnotatedLifecycleBean();
	}

}
